<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <button onclick="fn()">跳转</button>
    <button onclick="fn1()">刷新</button>
</body>
<script>
    function fn() {
        location.href = '04-href-1.html?name=ly&age=18'
    }

    function fn1() {
        //刷新页面
        //location.reload()
        //与href的区别替换文档不能返回上一个页面
        // location.replace('04-href-1.html')
        //location.assign('04-href-1.html')
    }
</script>

</html>